package com.suxin.test;


import com.suxin.exception.bussine.ExceptionOne;
import com.suxin.exception.bussine.Response;
import com.suxin.exception.bussine.RestException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Tang
 * @classname IndexController
 * @description [  ]
 * @date 2022/10/12 10:01
 */
@RestController
@RequestMapping("/index")
public class IndexController {

    @GetMapping("/error")
    public Response error() {
        throw new ExceptionOne("23");
    }

    @GetMapping("/error1")
    public Response error1() {
        throw new RestException("RestException");
    }

}
